//package com.bbcare.jiangmen.util;
//
//import com.ewell.sdk.business.EwellServiceTool;
//import com.ewell.sdk.domain.MessageEntity;
//import com.ewell.sdk.exception.SDKException;
//import org.apache.commons.logging.Log;
//import org.apache.commons.logging.LogFactory;
//import org.apache.log4j.Logger;
//
//import java.time.LocalDateTime;
//
///**
// * @Title		MqEwellService.java
// * @Package		com.bbcare.jiangmen.util
// * @Description	集成平台调用业务类
// * @Author		<a href="mailto:jiangqian_java@163.com">jiang</a>
// * @Date		2023/6/1
// * @Version		V1.0
// * @Copyright	(c) Shanghai BBcare Medical Equipment Co.,Ltd.
// */
//public class MqEwellService {
//
//    public static final Logger logger = Logger.getLogger(MqEwellService.class);
//
//    /**
//     * 平台接口调用
//     * @param fid fid
//     * @param orderNo 订单编号 平台提供
//     * @param query 请求体
//     */
//    public static String getDataFromMq( String fid, String orderNo, String query){
//        MessageEntity messageEntity = new MessageEntity();
//        try {
//            EwellServiceTool ewellServiceTool = new EwellServiceTool();
//            //定义请求体
//            String msgbody = "<ESBEntry>" +
//                    "<AccessControl>" +
//                    "<SysFlag>1</SysFlag>" +
//                    "<UserName>GWE</UserName>" +
//                    "<Password>GWE123456</Password>" +
//                    "<Fid>"+ fid +"</Fid>" +
//                    "<OrderNo>"+ orderNo +"</OrderNo>" +
//                    "</AccessControl>" +
//                    "<MessageHeader>" +
//                    "<Fid>"+ fid +"</Fid>" +
//                    "<OrderNo>"+ orderNo +"</OrderNo>" +
//                    "<SourceSysCode>S16</SourceSysCode>" +
//                    "<TargetSysCode>S00</TargetSysCode>" +
//                    "<HospCode>JMZX</HospCode>" +
//                    "<MsgDate>"+ LocalDateTime.now()+"</MsgDate>" +
//                    "</MessageHeader>" +
//                    "<RequestOption>" +
//                    "<triggerData>0</triggerData>" +
//                    "<dataAmount>500</dataAmount>" +
//                    "</RequestOption>" +
//                    "<MsgInfo flag=\"1\">" +
//                    "<Msg/>" +
//                    "<distinct value=\"0\"/>"
//                    + query +
//                    "</MsgInfo>" +
//                    "<GroupInfo flag=\"0\">" +
//                    "<AS ID=\"\" linkField=\"\"/>" +
//                    "</GroupInfo>" +
//                    "</ESBEntry>";
//            logger.info("=================jiangq 请求连接字符串+msg："+query+"===============================================================");
//            messageEntity = ewellServiceTool.composePutAndGetMsg("QMGR.S16", null, 200000, msgbody);
//            logger.info("=================jiangq 获取连接返回+msg："+messageEntity.getMsg()+"===============================================================");
//        } catch (SDKException e) {
//            e.printStackTrace();
//        }finally {
//            return messageEntity.getMsg();
//        }
//    }
//
//}
